#include "stdio.h"
#include "stdlib.h"
#include "unistd.h"
#include "signal.h"
void sig_handler(int sig) {
    write(1, "Signal caught\n", 14);
    exit(0);
}
int main(int argc, char const *argv[])
{
    struct sigaction act;
    act.sa_handler = sig_handler;
    sigemptyset(&act.sa_mask);
    act.sa_flags = 0;
    sigaction(SIGINT, &act, 0);

    while(1) {
        sleep(1);
    }

    return 0;
}
